var app = getApp()
var host = app.data.host
var httpUtil = require('../utils/httpUtil.js')
var getCustomerCardValuesUrl = host + 'getCustomerCardValues'
var getCustomerCardCountUrl = host + 'getCustomerCardCount'
var getCustomerCardProductUrl = host +"getCustomerCardProduct"
//用户储值卡
function getCustomerCardValues(cb) {
  var uid = app.data.user.id
  httpUtil.get(getCustomerCardValuesUrl, {
    cid: uid
  }, cb)
}
//用户次卡
function getCustomerCardCounts(cb) {
  var uid = app.data.user.id
  httpUtil.get(getCustomerCardCountUrl, {
    cid: uid
  }, cb)
}
//用户次卡对应商品
function getCustomerCardProduct(data,cb){
  httpUtil.get(getCustomerCardProductUrl,data,cb)
}
module.exports = {
  getCustomerCardValues: getCustomerCardValues,
  getCustomerCardCounts: getCustomerCardCounts,
  getCustomerCardProduct: getCustomerCardProduct
}